home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
...taking it to the Macs!
/
...taking it to the Macs!.iso
/
Extras
/
ActiveX Mac SDK
/
ActiveX SDK
/
Control Common
/
CBaseControl.h
< prev
next >
Wrap
Text File
|
1996-12-17
|
3KB
|
99 lines
// =================================================================================
//
// CBaseControl.h ©1996 Microsoft Corporation All rights reserved.
//
// =================================================================================
#ifndef _H_CBaseControl
#define _H_CBaseControl
#pragma once
class CBaseControl;
class CBaseContextInfo
{
public:
// *** CBaseContextInfo methods ***
CBaseContextInfo(CBaseControl* inControlP, Uint32 ContextID);
virtual ~CBaseContextInfo(void);
virtual ErrorCode Update(Boolean8 Acquired);
virtual ErrorCode Activate(Boolean8 Acquired);
virtual ErrorCode Deactivate(Boolean8 Acquired);
Uint32 GetContextID(void) { return mContextID; };
protected:
// *** CBaseContextInfo members ***
Uint32 mContextID;
CBaseControl* mControlP;
};
class CBaseControl :
public CBaseCOM,
public IObjectWithSite,
public IControl,
public IPersistPropertyBag
{
public:
// *** CBaseControl methods ***
CBaseControl(void);
virtual ~CBaseControl(void);
// *** IUnknown methods ***
STDMETHOD (QueryInterface)(REFIID inRefID, void** outObj);
STDMETHOD_ (Uint32, AddRef)(void) { return CBaseCOM::AddRef(); }
STDMETHOD_ (Uint32, Release)(void) { return CBaseCOM::Release(); }
// *** IObjectWithSite methods ***
STDMETHOD (SetSite)(THIS_ IUnknown* inUnkSite);
STDMETHOD (GetSite)(THIS_ REFIID inRefID, void** outSite);
// *** IControl methods ***
STDMETHOD (Draw) (THIS_ DrawContext* inContext);
STDMETHOD (OnContextChange)(THIS_ UInt32 inContextID, ContextCommand inCommand);
STDMETHOD (GetID)(THIS_ Int32 inBufferSize, Char8* outID);
STDMETHOD (GetUsedArea)(THIS_ PlatformRegion* outUsedArea);
STDMETHOD (SetFocus)(THIS_ FocusCommand inCommand, FocusSet inFocus);
STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent);
STDMETHOD (DoKey)(THIS_ KeyEventType inKeyET, Char8 inChar, PlatformEvent* inEvent);
STDMETHOD (DoActivate)(THIS_ ActivateEventType inActiveET, UInt32 inContextID, PlatformEvent* inEvent);
STDMETHOD (DoSystemEvent)(THIS_ PlatformEvent* inEvent);
STDMETHOD (DoIdle)(THIS_ Uint32 IdleRefCon) ;
// *** IPersist methods ***
STDMETHOD (GetClassID)(CLSID* ClassID);
// *** IPersistPropertyBag methods ***
STDMETHOD (InitNew)(void);
STDMETHOD (Load)(IPropertyBag* PropertyBag, IErrorLog* ErrorLog);
STDMETHOD (Save)(IPropertyBag* PropertyBag, BOOL ClearDirty, BOOL SaveAllProperties);
protected:
// *** CBaseControl methods ***
virtual Boolean8 StartIdling(void);
virtual Boolean8 StopIdling(void);
virtual CBaseContextInfo* NewContext(Uint32 inContextID);
void InvalAllContexts(void);
Boolean8 GetContextID(Int16 Index, Uint32* outContextID);
CBaseContextInfo* GetContextInfoByID(Uint32 inContextID);
CBaseContextInfo* GetContextInfoByIndex(Int16 inIndex);
// *** CBaseControl member variables ***
IUnknown* mUnkOuterP;
IContainerSite* mContainerSiteP;
IContainer* mContainerP;
PlatformPoint mSize;
Str255 mID;
Uint16 mActive : 1;
CBaseContextInfo* mActiveContext; // Currently Active Context
LArray* mContextInfo; // list of contexts for this control & its control info
IConnectionPointContainer* mCPContainerP; // Connection point container
};
#endif